<template>
	<view>
		<view class="shoppping" @click="buy1()">
			<view style="display: flex;height: 360rpx;width: 450rpx;flex-direction: column;justify-content: space-around">
				<view style="display: flex;align-items: center;">
					<image @click.stop="store('shengjing')" :src="sdufe_store_image['shengjing']" style="width: 50rpx;height: 50rpx;"></image>
					<span style="font-size: 38rpx;font-weight: bolder;white-space: pre;padding-left: 5rpx;">山东财经大学圣井店</span>
				</view>
				<view style="display: flex;align-items: center;">
					<image src="../../../../static/定向.png" style="width: 30rpx;height: 30rpx;"></image>
					<p style="font-size: 30rpx;color: grey; white-space: pre;padding-left: 5rpx;overflow: auto;"  >山东财经大学圣井校区第三餐厅</p>
				</view>
				<view style="display: flex;align-items: center;">
					<image src="../../../../static/时间.png" style="width: 30rpx;height: 30rpx;"></image>
					<span style="font-size: 30rpx;color: grey;white-space: pre;padding-left: 5rpx;">09:30-21:30</span>
				</view>
				<!-- <van-button plain @click="btn()"  color="darkgreen" style="width: 180rpx;height: 80rpx;" id="btn">营业中</van-button> -->
				<view style="font-size: 30rpx;text-align: center;width: 100rpx;height: 42rpx;border-color: darkgreen;color: darkgreen;border-color: darkgreen; border-radius: 5rpx;border-width: 4rpx;border-style: solid;" >营业中</view>
			</view>
			<hr style="width: 1rpx;height: 300rpx;background-color: #d0d0d0;">
			<view style="display: flex;height: 380rpx;flex-direction: column;justify-content: space-around;align-items: center;">
				
					<span style="color: green;">去下单</span>
				<view style="display: flex;justify-content: space-around;width: 200rpx;">
					<view style="background-color: #d0d0d0;height: 70rpx;width: 70rpx;border-radius: 100rpx;align-items: center;justify-content: center;display: flex;"><image src="../../../../static/一键呼叫.png" style="height: 50rpx;width: 50rpx;"></image></view>
					<view style="background-color: #d0d0d0;height: 70rpx;width: 70rpx;border-radius: 100rpx;align-items: center;justify-content: center;display: flex;"><image src="../../../../static/导航.png" style="height: 40rpx;width: 40rpx;"></image></view>
				</view>
				
			</view>
		</view>
		
		<view class="shoppping" @click="buy2()">
			<view style="display: flex;height: 360rpx;width: 450rpx;flex-direction: column;justify-content: space-around">
				<view style="display: flex;align-items: center;">
					<image @click.stop="store('yanshan')" :src="sdufe_store_image['yanshan']" style="width: 50rpx;height: 50rpx;"></image>
					<span style="font-size: 38rpx;font-weight: bolder;white-space: pre;padding-left: 5rpx;">山东财经大学燕山店</span>
				</view>
				<view style="display: flex;align-items: center;">
					<image src="../../../../static/定向.png" style="width: 30rpx;height: 30rpx;"></image>
					<p style="font-size: 30rpx;color: grey; white-space: pre;padding-left: 5rpx;overflow: auto;"  >山东财经大学燕山校区某个地点</p>
				</view>
				<view style="display: flex;align-items: center;">
					<image src="../../../../static/时间.png" style="width: 30rpx;height: 30rpx;"></image>
					<span style="font-size: 30rpx;color: grey;white-space: pre;padding-left: 5rpx;">09:30-21:30</span>
				</view>
				<!-- <van-button plain @click="btn()"  color="darkgreen" style="width: 180rpx;height: 80rpx;" id="btn">营业中</van-button> -->
				<view style="font-size: 30rpx;text-align: center;width: 100rpx;height: 42rpx;border-color: darkgreen;color: darkgreen;border-color: darkgreen; border-radius: 5rpx;border-width: 4rpx;border-style: solid;" >营业中</view>
			</view>
			<hr style="width: 1rpx;height: 300rpx;background-color: #d0d0d0;">
			<view style="display: flex;height: 380rpx;flex-direction: column;justify-content: space-around;align-items: center;">
				
					<span style="color: green;">去下单</span>
				<view style="display: flex;justify-content: space-around;width: 200rpx;">
					<view style="background-color: #d0d0d0;height: 70rpx;width: 70rpx;border-radius: 100rpx;align-items: center;justify-content: center;display: flex;"><image src="../../../../static/一键呼叫.png" style="height: 50rpx;width: 50rpx;"></image></view>
					<view style="background-color: #d0d0d0;height: 70rpx;width: 70rpx;border-radius: 100rpx;align-items: center;justify-content: center;display: flex;"><image src="../../../../static/导航.png" style="height: 40rpx;width: 40rpx;"></image></view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				if_store:{
					// sdufe:uni.getStorageSync("sdufe_store_image")|false
				},
				sdufe_store_image:{
					shengjing:"../../../../static/收藏.png",
					yanshan:"../../../../static/收藏.png"
				},
				account:this.$store.getters.account
			}
		},
		created() {
			let t=this
			uni.request({
				data:JSON.stringify({account:t.account}),
				dataType:"application/json",
				method:"POST",
				url:"http://localhost:3000/getStore",
				success(data) {
					for(let i=0;i<data.data.length;i++){
						console.log(data)
						 t.$set(t.if_store,JSON.parse(data.data)[i].shop_name,true)
						 t.$set(t.sdufe_store_image,JSON.parse(data.data)[i].shop_name,"../../../../static/收藏11.png")
					}
					
					
				}
				
			})
		},
		// watch:{
		// 	deep:true,
		// 	if_store:{
		// 		handler(n,o){
		// 			if()
		// 		}
		// 	}
		// },
		methods: {
			buy1(){
				uni.navigateTo({
					url:"/pages/index/buy/list/list?shop_name=山东财经大学圣井店&shop_addr=山东财经大学圣井校区第三餐厅"
				})
			},
			buy2(){
				uni.navigateTo({
					url:"/pages/index/buy/list/list?shop_name=山东财经大学燕山店&shop_addr=山东财经大学燕山校区某个地点"
				})
			},
				
			store(name){
				
			}
		}
	}
</script>

<style scoped>
.shoppping{
		width: 710rpx;
		height: 350rpx;
		background-color: white;
		margin-top: 50rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
</style>
